<?php
	// Initialization
	$active['players'] = '';
	$active['clans'] = '';
	$active['weapons'] = '';
	$active['servers'] = '';
	$controller = $this->uri->segment(1);
	$method = $this->uri->segment(2);
	
	// Players related content - set as active tab
	if (  (($controller == 'home') && ($method == 'players')) ||
		  (($controller == 'stats') && ($method == 'player')) ||
		  (($controller == 'search')) ||
		  (($controller == ''))
		)
	{
		$active['players'] = 'active';
	}
	// Weapons related
	else if (  (($controller == 'home') && ($method == 'weapons')) ||
		  	   (($controller == 'stats') && ($method == 'weapon'))
			)
	{
		$active['weapons'] = 'active';
	}
	// Server Snapshot
	else if (  (($controller == 'home') && ($method == 'servers'))
			)
	{
		$active['servers'] = 'active';
	}
	// Clans related
	else if (  (($controller == 'home') && ($method == 'clans'))
			)
	{
		$active['clans'] = 'active';
	}
?>
<li id="tab_clan" class="<?=$active['clans']?>"><?=anchor('home/clans', '<span>Clan Statistics</span>')?></li>
<li id="tab_player" class="<?=$active['players']?>"><?=anchor('home/players', '<span>Player Statistics</span>')?></li>
<li id="tab_weapon" class="<?=$active['weapons']?>"><?=anchor('home/weapons', '<span>Weapon Statistics</span>')?></li>
<li id="tab_server" class="<?=$active['servers']?>"><?=anchor('home/servers', '<span>Server Snapshot</span>')?></li>